package com.tuanzi.loan.vo.view.family.product;

import lombok.Data;
import lombok.Getter;

import java.util.List;

/**
 * 贷款产品准入条件
 */
@Data
public class ApplyCondition {

	private Long productId;

	private AreaCondition areaCondition;

	private BasicCondition basicCondition;

	private BlackListCondition blackListCondition;

	private LongLoanCondition longLoanCondition;

	@Data
	public static final class AreaCondition {

		private List<String> excludeProvince;

		private List<String> excludeCity;
	}

	@Data
	public static final class BasicCondition {

		private Integer minAge;

		private Integer maxAge;

		private Integer phoneCount;
	}

	@Data
	public static final class BlackListCondition {

		private Boolean lossOfTrust;

		private Boolean executedPerson;

		private Boolean policeWarning;

		private List<BlackListType> bank;

		private List<BlackListType> networkPdl;

		private List<BlackListType> pdl;

		private List<BlackListType> consumerFinance;

		private List<BlackListType> financeLease;

		private List<BlackListType> carFinance;

		private List<BlackListType> other;

	}

	@Data
	public static final class LongLoanCondition {

		private Integer longLoan7d;

		private Integer longLoan15d;

		private Integer longLoan1m;

		private Integer longLoan3m;

		private Integer longLoan6m;

		private Integer longLoan12m;

	}

	public enum BlackListType {
		NORMAL("一般风险"), MEDIUM("中等风险"), HIGH("高风险"), POOR_QUALITY("资质不佳"), REJECT("拒绝");

		@Getter
		private String name;

		BlackListType(String name) {
			this.name = name;
		}
	}

}
